<template>
  <BtnGroup :title="`${configKey === 'titleColor' ? '标题' : '描述'}颜色`" :status="status">
    <el-color-picker v-model="color" @change="changeColor" />
  </BtnGroup>
</template>

<script setup lang="ts">
import BtnGroup from './components/BtnGroup.vue'
import type { VueComType } from '@/types'

const props = defineProps<{
  configKey: string
  id: string
  status: string
  isShow: boolean
  editCom: VueComType
}>()
const color = ref(props.status)
const updateStatus = inject('updateStatus') as Function

const changeColor = (color: string | null) => {
  console.log(color)
  updateStatus(props.configKey, color)
}
</script>

<style scoped></style>
